package mark.tom.fiter.demo;


import androidx.annotation.NonNull;

import mark.tom.fiter.DTOConverter;

public class TestBO {

    public String accessToken;

    public String error_no;

    public String error_info;

    @Override
    public String toString() {
        return "TestBO{" +
                "accessToken='" + accessToken + '\'' +
                ", error_no='" + error_no + '\'' +
                ", error_info='" + error_info + '\'' +
                '}';
    }

    public final static class TestDTOConverter extends DTOConverter<TestBO, TestDTO> {
        @NonNull
        @Override
        public TestBO convert(@NonNull TestDTO testDTO) {
            TestBO testBO = new TestBO();
            testBO.accessToken = testDTO.data.get("access_token");

            testBO.error_no = testDTO.data.get("error_no");
            testBO.error_info = testDTO.data.get("error_info");
            return testBO;
        }
    }
}
